package name.hankc.spring.service.impl;

import java.util.List;

import name.hankc.spring.dao.BeanFactory;
import name.hankc.spring.dao.DemoDao;
import name.hankc.spring.service.DemoService;

public class DemoServiceImpl implements DemoService {

  DemoDao demoDao = (DemoDao) BeanFactory.getBean("demoDao");

  public DemoServiceImpl() {
    for (int i = 0; i < 10; i++) {
      System.out.println(BeanFactory.getBean("demoDao"));
    }
  }

  @Override
  public List<String> findAll() {
    return demoDao.findAll();
  }
}